<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>JS对象key测试</title>

    <script>

        function test() {
            console.log(this);
        }

        const obj = {
            name: "张三",
            age: 20,
        };

        obj.fn = test;

        test();

        obj.fn();
        

    </script>
</head>

<body>

</body>

</html>